import sqlite3
import pandas as pd
import mplfinance as mpf 

with sqlite3.connect('example.db') as conn:
    df = pd.read_sql("select * from daily",conn)
    df['trade_date'] = pd.to_datetime(df['trade_date'])
    df.set_index('trade_date',inplace=True)

    df = df[['open','high','low','close','vol']]
    df.columns = ['Open','High','Low','Close','Volume']
    print(df.head())
    mpf.plot(df,type='candle',style='charles',volume=True)
    
    


    

